package com.wzxy.ping.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.wzxy.ping.bean.Persinfo;
import com.wzxy.ping.service.PersinfoService;

@Component("persinofAction")
@Scope("prototype")
public class PersinfoAction extends SuperController{

	private static final long serialVersionUID = 1L;
	
	@Autowired
	private PersinfoService persinfoService;
	
	@Action(value = "/persinof/list",results = {@Result(name="list",location="/persinfo.jsp")})
	public String issuccess() throws Exception{
		Map<String, String> map = getParamMap();
		List<Persinfo> list = persinfoService.getPersinfoList();
		getSession().setAttribute("list", list);
		return "list";
	}

}
